package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.common.manage.dto.UserDto;
import com.zhentao.service.MaUserService;
import com.zhentao.service.impl.MaUserServiceImpl;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 王越潇
 * @version 1.0
 * @Date 2024/9/14 10:00
 * @Type
 */
@RestController
@RequestMapping("/manage/log1")
@Api(tags = "manage",description = "管理端登入接口")
public class ManageUserController {
    @Autowired
    private MaUserService maUserService;
    //登录
    @PostMapping("in")
    public ResponseResult login(@RequestBody UserDto userDto){
        return maUserService.login(userDto);
    }
    @GetMapping("findAll/{id}")
    public ResponseResult findAll(@PathVariable("id") Integer id){
        return maUserService.findAll(id);
    }
}
